include_directories(${PROJECT_SOURCE_DIR})
add_subdirectory(config_test)

if(EXISTS ${CMAKE_SOURCE_DIR}/gateway/include/http_server.h)
    add_subdirectory(ping_service_test)
else()
    message(STATUS "ping_service_test skipped: legacy gateway headers not present")
endif()

# gRPC测试客户端
add_executable(test_grpc_client
    test_grpc_client.cpp
)

target_link_libraries(test_grpc_client
    PRIVATE
        service_rpc_proto
        gRPC::grpc++
        protobuf::libprotobuf
        nlohmann_json::nlohmann_json
)

target_include_directories(test_grpc_client PRIVATE
    ${CMAKE_SOURCE_DIR}
    ${CMAKE_BINARY_DIR}/protos
)
